.container
  .ui.grid
    .row
      .four.wide.column
        = render partial: 'sidebar', locals: { inno: @innoaward }
      .twelve.wide.column.list-view
        .ui.message#updateState hidden=true
          i.close.icon
        #list-categories v-show="selectedCategory === ''"
          .ui.borderless.menu
            .item.header
              | 合作伙伴管理
            .right.item
               .ui.action.input
                 input type='text' v-model='newCategory' placeholder='新类别'
                 input.ui.primary.button type='submit' value='添加' v-on='click: addNewCategory'
          table.ui.celled.padded.table
            thead
              tr
                th.two.wide
                  | 序号
                th.six.wide
                  | 类别名称
                th.six.wide
                  |
                th.four.wide
                  | 操作
            tbody v-el='cList'
              tr v-repeat='category in categories' data-name='{{category}}'
                td.movable v-text='$index + 1'
                td
                  a v-text='category' v-on='click: selectCategory($index)' href='javascript:;'
                td
                td v-on='click: removeCategory($index)'
                  a href='javascript:;'
                    | 删除
        #list-partners v-show="selectedCategory !== ''"
          .ui.borderless.menu
            .item.header v-text='selectedCategory'
            a.ui.button.item v-on='click: returnCategories'
              | 返回
            .right.item
              .ui.action.input
                .ui.multiple.search.selection.dropdown
                  input type='hidden' name='selected-partners' v-el='selectedPartnerIDs'
                  i.dropdown.icon
                  .default.text
                    | 选择合作伙伴
                  .menu
                    .item data-value='{{partner.id}}' v-repeat='partner in allPartners | selectable' v-text='partner.name'
                .ui.blue.button v-on='click: addNewPartners'
                  | 添加
                a.ui.button.should-pop href='http://events.geekpark.net/admin/partners/new' target='_blank' data-content='新建完成后请点击刷新'
                  | 新建
                a.ui.button v-on='click: refreshSelectablePartners'
                  | 刷新
          table.ui.celled.padded.table
            thead
              tr
                th.two.wide
                  | 序号
                th.six.wide
                  | 合作伙伴
                th.six.wide
                  | 类别
                th.four.wide
                  | 操作
            tbody v-el='pList'
              tr v-repeat='partner in partners' data-id='{{partner.id}}'
                td.movable v-text='$index+1'
                td
                  a v-text='partner.name'
                td v-text='selectedCategory'
                td
                  a v-on='click: removePartner($index)'
                    | 删除
